package com.my.java8;

public class DefaultMethodExample {

	interface Sized {
		int size();

		default boolean isEmpty() {
			return size() == 0;
		}
	}

	public interface A {
		default void hello() {
			System.out.println("Hello from A");
		}
	}

	public interface B {
		default void hello() {
			System.out.println("Hello from B");
		}
	}

	public static class C implements B, A {

		@Override
		public void hello() {
			B.super.hello();
		}
		/*void hello(){
			B.super.hello();
		}*/
	}

	public static void main(String[] args) {
		new C().hello();

	}

}
